package com.iims.flowable.mapper;

import com.iims.flowable.flow.domain.FlowableCategory;
import com.iims.flowable.flow.identity.GroupQuery;
import com.iims.flowable.flow.identity.UserQuery;
import com.iims.flowable.flow.vo.ProcessDefinitionVo;
import com.iims.flowable.flow.vo.request.FlowSummaryQueryVo;
import org.apache.ibatis.annotations.Mapper;
import org.flowable.idm.api.Group;
import org.flowable.idm.api.User;

import java.util.List;

/**
 * 流程公共查询Mapper，用于解耦系统sys模块
 *
 * @author fanpei
 */
@Mapper
public interface FlowableCommonMapper {
    /**
     * 查询用户信息
     *
     * @param query
     * @return
     */
    List<User> selectUserByQueryCriteria(UserQuery query);

    /**
     * 查询用户信息
     *
     * @param query
     * @return
     */
    Long selectUserCountByQueryCriteria(UserQuery query);

    /**
     * 根据Flowable GroupQueryImpl查询岗位列表
     *
     * @param query
     * @return
     */
    List<Group> selectGroupByQueryCriteria(GroupQuery query);

    /**
     * 根据Flowable GroupQueryImpl查询岗位数量
     *
     * @param query
     * @return
     */
    Long selectGroupCountByQueryCriteria(GroupQuery query);

    /**
     * 查询我的流程汇总信息
     *
     * @param flowSummaryQueryVo
     * @return
     */
    List<ProcessDefinitionVo> listMyInvolvedSummary(FlowSummaryQueryVo flowSummaryQueryVo);

    /**
     * 获取所有分类
     * @return
     */
    List<FlowableCategory> selectCategoryList();
}
